﻿using System;
using Zongsoft.Data;

namespace Dxr.Police.IACS.Models
{
    public class ResourceConditional : Conditional
    {
        [Conditional(@operator: ConditionOperator.Equal)]
        public string Id
        {
            get { return this.GetPropertyValue(() => this.Id); }
            set { this.SetPropertyValue(() => this.Id, value); }
        }

        [Conditional(@operator: ConditionOperator.Equal)]
        public DataType? Type
        {
            get { return this.GetPropertyValue(() => this.Type); }
            set { this.SetPropertyValue(() => this.Type, value); }
        }

        [Conditional(@operator: ConditionOperator.Like, names: new string[] { "Name", "CollectorName", "CollectorDepartmentName", "CollectorPhoneNo", "CreatorName" })]
        public string Key
        {
            get { return this.GetPropertyValue(() => this.Key); }
            set { this.SetPropertyValue(() => this.Key, value); }
        }
    }
}
